<template>
  <div class="big">
    <div class="banner">
      <img :src="tu" alt="" width="100%"/>
      <h3>{{name}}</h3>
    </div>
    <p>
      {{simple_desc}}
    </p>
  </div>
</template>

<script>
import {brandXiangQing} from "@/request/api"
export default {
  data() {
    return {
        id:'',
        name:'',
        simple_desc:'',
        tu:''
    };
  },
  methods: {},
  created(){
    // 接收home页面传过来的id
    // console.log(this.$route.params);
    this.id = this.$route.params.id
    // console.log(this.id);
    brandXiangQing({id:this.id}).then(res=>{
        console.log(res);
        this.name = res.data.brand.name
        this.simple_desc = res.data.brand.simple_desc
        this.tu = res.data.brand.list_pic_url
    })

  },
  components: {},
};
</script>

<style lang="less" scoped>
.banner {
  width: 100%;
  height: 1.8rem;
  background-color: pink;
  position: relative;
  img {
    width: 100%;
    height: 1.8rem;
  }
  h3 {
    width: 100%;
    height: 0.3rem;
    position: absolute;
    top: 50%;
    margin-top: -0.15rem;
    text-align: center;
    font-size:.2rem;
    color:#fff;
    text-decoration:underline;
  }
}
p {
  width: 100%;
  height: 1.1rem;
  background-color:#fff;
  padding: 0.1rem;
  box-sizing: border-box;
  text-align: center;
  line-height:.3rem;
}
</style>
